'use strict';
var rank_desc = function(collection){

  let mapped=collection.map(function(ele,i){
      return {inder:i,value:ele};
  })
  mapped.sort(function(a,b){
      return +(a.value>b.value)||+(a.value===b.value)-1;
  })
  let result=mapped.map(function(ele){
      return collection[ele.inder];
  })
  return result;

};

module.exports = rank_desc;
